<?php
namespace ImiApp\Module\Member\Model\Base;

use Imi\Model\Model as Model;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;

/**
 * 系统配置 基类
 * @Entity
 * @Table(name="fa_config", id={"id"})
 * @DDL("CREATE TABLE `fa_config` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '变量名',
  `group` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '分组',
  `title` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '变量标题',
  `tip` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '变量描述',
  `type` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '类型:string,text,int,bool,array,datetime,date,file',
  `visible` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '可见条件',
  `value` text COLLATE utf8mb4_unicode_ci COMMENT '变量值',
  `content` text COLLATE utf8mb4_unicode_ci COMMENT '变量字典数据',
  `rule` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '验证规则',
  `extend` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '扩展属性',
  `setting` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '配置',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系统配置'")
 * @property int $id 
 * @property string $name 变量名
 * @property string $group 分组
 * @property string $title 变量标题
 * @property string $tip 变量描述
 * @property string $type 类型:string,text,int,bool,array,datetime,date,file
 * @property string $visible 可见条件
 * @property string $value 变量值
 * @property string $content 变量字典数据
 * @property string $rule 验证规则
 * @property string $extend 扩展属性
 * @property string $setting 配置
 */
abstract class ConfigBase extends Model
{
    /**
     * id
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true)
     * @var int
     */
    protected $id;

    /**
     * 获取 id
     *
     * @return int
     */ 
    public function getId()
    {
        return $this->id;
    }

    /**
     * 赋值 id
     * @param int $id id
     * @return static
     */ 
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    /**
     * 变量名
     * name
     * @Column(name="name", type="varchar", length=30, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $name;

    /**
     * 获取 name - 变量名
     *
     * @return string
     */ 
    public function getName()
    {
        return $this->name;
    }

    /**
     * 赋值 name - 变量名
     * @param string $name name
     * @return static
     */ 
    public function setName($name)
    {
        $this->name = $name;
        return $this;
    }

    /**
     * 分组
     * group
     * @Column(name="group", type="varchar", length=30, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $group;

    /**
     * 获取 group - 分组
     *
     * @return string
     */ 
    public function getGroup()
    {
        return $this->group;
    }

    /**
     * 赋值 group - 分组
     * @param string $group group
     * @return static
     */ 
    public function setGroup($group)
    {
        $this->group = $group;
        return $this;
    }

    /**
     * 变量标题
     * title
     * @Column(name="title", type="varchar", length=100, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $title;

    /**
     * 获取 title - 变量标题
     *
     * @return string
     */ 
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * 赋值 title - 变量标题
     * @param string $title title
     * @return static
     */ 
    public function setTitle($title)
    {
        $this->title = $title;
        return $this;
    }

    /**
     * 变量描述
     * tip
     * @Column(name="tip", type="varchar", length=100, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $tip;

    /**
     * 获取 tip - 变量描述
     *
     * @return string
     */ 
    public function getTip()
    {
        return $this->tip;
    }

    /**
     * 赋值 tip - 变量描述
     * @param string $tip tip
     * @return static
     */ 
    public function setTip($tip)
    {
        $this->tip = $tip;
        return $this;
    }

    /**
     * 类型:string,text,int,bool,array,datetime,date,file
     * type
     * @Column(name="type", type="varchar", length=30, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $type;

    /**
     * 获取 type - 类型:string,text,int,bool,array,datetime,date,file
     *
     * @return string
     */ 
    public function getType()
    {
        return $this->type;
    }

    /**
     * 赋值 type - 类型:string,text,int,bool,array,datetime,date,file
     * @param string $type type
     * @return static
     */ 
    public function setType($type)
    {
        $this->type = $type;
        return $this;
    }

    /**
     * 可见条件
     * visible
     * @Column(name="visible", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $visible;

    /**
     * 获取 visible - 可见条件
     *
     * @return string
     */ 
    public function getVisible()
    {
        return $this->visible;
    }

    /**
     * 赋值 visible - 可见条件
     * @param string $visible visible
     * @return static
     */ 
    public function setVisible($visible)
    {
        $this->visible = $visible;
        return $this;
    }

    /**
     * 变量值
     * value
     * @Column(name="value", type="text", length=0, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $value;

    /**
     * 获取 value - 变量值
     *
     * @return string
     */ 
    public function getValue()
    {
        return $this->value;
    }

    /**
     * 赋值 value - 变量值
     * @param string $value value
     * @return static
     */ 
    public function setValue($value)
    {
        $this->value = $value;
        return $this;
    }

    /**
     * 变量字典数据
     * content
     * @Column(name="content", type="text", length=0, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $content;

    /**
     * 获取 content - 变量字典数据
     *
     * @return string
     */ 
    public function getContent()
    {
        return $this->content;
    }

    /**
     * 赋值 content - 变量字典数据
     * @param string $content content
     * @return static
     */ 
    public function setContent($content)
    {
        $this->content = $content;
        return $this;
    }

    /**
     * 验证规则
     * rule
     * @Column(name="rule", type="varchar", length=100, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $rule;

    /**
     * 获取 rule - 验证规则
     *
     * @return string
     */ 
    public function getRule()
    {
        return $this->rule;
    }

    /**
     * 赋值 rule - 验证规则
     * @param string $rule rule
     * @return static
     */ 
    public function setRule($rule)
    {
        $this->rule = $rule;
        return $this;
    }

    /**
     * 扩展属性
     * extend
     * @Column(name="extend", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $extend;

    /**
     * 获取 extend - 扩展属性
     *
     * @return string
     */ 
    public function getExtend()
    {
        return $this->extend;
    }

    /**
     * 赋值 extend - 扩展属性
     * @param string $extend extend
     * @return static
     */ 
    public function setExtend($extend)
    {
        $this->extend = $extend;
        return $this;
    }

    /**
     * 配置
     * setting
     * @Column(name="setting", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $setting;

    /**
     * 获取 setting - 配置
     *
     * @return string
     */ 
    public function getSetting()
    {
        return $this->setting;
    }

    /**
     * 赋值 setting - 配置
     * @param string $setting setting
     * @return static
     */ 
    public function setSetting($setting)
    {
        $this->setting = $setting;
        return $this;
    }

}
